{
g_return_val_if_fail (property != NULL, FALSE);
- return gtk_style_param_get_inherit (property->pspec);
+ return property->flags & GTK_STYLE_PROPERTY_INHERIT ||
+ gtk_style_param_get_inherit (property->pspec);
}
gboolean
G_TYPE_STRV, 0);
gtk_style_param_set_inherit (pspec, TRUE);
_gtk_style_property_register (pspec,
+ 0,
NULL,
NULL,
NULL,
PANGO_TYPE_FONT_DESCRIPTION, 0);
gtk_style_param_set_inherit (pspec, TRUE);
_gtk_style_property_register (pspec,
+ 0,
NULL,
unpack_font_description,
pack_font_description,
"Margin",
"Margin",
GTK_TYPE_BORDER, 0),
+ 0,
NULL,
unpack_margin,
pack_margin,
"Padding",
"Padding",
GTK_TYPE_BORDER, 0),
+ 0,
NULL,
unpack_padding,
pack_padding,
"Border width",
"Border width, in pixels",
GTK_TYPE_BORDER, 0),
+ 0,
NULL,
unpack_border_width,
pack_border_width,
"Border top left radius",
"Border radius of top left corner, in pixels",
GTK_TYPE_CSS_BORDER_CORNER_RADIUS, 0),
+ 0,
NULL,
NULL,
NULL,
"Border top right radius",
"Border radius of top right corner, in pixels",
GTK_TYPE_CSS_BORDER_CORNER_RADIUS, 0),
+ 0,
NULL,
NULL,
NULL,
"Border bottom right radius",
"Border radius of bottom right corner, in pixels",
GTK_TYPE_CSS_BORDER_CORNER_RADIUS, 0),
+ 0,
NULL,
NULL,
NULL,
"Border bottom left radius",
"Border radius of bottom left corner, in pixels",
GTK_TYPE_CSS_BORDER_CORNER_RADIUS, 0),
+ 0,
NULL,
NULL,
NULL,
"Border radius",
"Border radius, in pixels",
0, G_MAXINT, 0, 0),
+ 0,
NULL,
unpack_border_radius,
pack_border_radius,
"Key bindings",
"Key bindings",
G_TYPE_PTR_ARRAY, 0),
+ 0,
NULL,
NULL,
NULL,
void
_gtk_style_property_register (GParamSpec *pspec,
+ GtkStylePropertyFlags flags,
GtkStylePropertyParser property_parse_func,
GtkStyleUnpackFunc unpack_func,
GtkStylePackFunc pack_func,
}
node = g_slice_new0 (GtkStyleProperty);
+ node->flags = flags;
node->pspec = pspec;
node->property_parse_func = property_parse_func;
node->pack_func = pack_func;
G_BEGIN_DECLS
typedef struct _GtkStyleProperty GtkStyleProperty;
+typedef enum {
+ GTK_STYLE_PROPERTY_INHERIT = (1 << 0)
+} GtkStylePropertyFlags;
typedef GParameter * (* GtkStyleUnpackFunc) (const GValue *value,
guint *n_params);
struct _GtkStyleProperty
{
GParamSpec *pspec;
+ GtkStylePropertyFlags flags;
+
GtkStylePropertyParser property_parse_func;
GtkStyleUnpackFunc unpack_func;
GtkStylePackFunc pack_func;
const GtkStyleProperty * _gtk_style_property_lookup (const char *name);
void _gtk_style_property_register (GParamSpec *pspec,
+ GtkStylePropertyFlags flags,
GtkStylePropertyParser property_parse_func,
GtkStyleUnpackFunc unpack_func,
GtkStylePackFunc pack_func,